﻿using UnityEngine;
using System.Collections;
using UnityEngine.Networking;

public class EnemySpawner : NetworkBehaviour
{
	public GameObject enemyPrefab;

	public override void OnStartServer ()
	{
		base.OnStartServer ();
		for (var i = 0; i<5; i++) {
			var p = new Vector3 (Random.Range (-10, 10), 0.2f, Random.Range (-10, 10));
			NetworkServer.Spawn(Instantiate(enemyPrefab,p,Quaternion.identity) as GameObject);
		}
	}
}
